<script setup lang="ts">
import { formatDate } from '../../../utils/format'

export type CardPropsType = {
	imgUrl: string
	title: string
	address: string
	beginDate: Date
	endDate: Date
}

const props = defineProps<CardPropsType>()
</script>

<template>
	<view class="flex">
		<view>
			<image class="h-200 w-150 mr-2" :src="props.imgUrl" />
		</view>
		<view class="flex flex-col">
			<text class="font-bold text-35" v-html="props.title"></text>
			<text class="text-gray-500 text-30">{{ props.address }}</text>
			<text class="text-gray-500 text-30">{{ formatDate(props.beginDate) }}</text>
			<text class="text-gray-500 text-30">{{ formatDate(props.endDate) }}</text>
		</view>
	</view>
</template>